package com.cloud.rapid.project.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cloud.rapid.project.entity.RpProject;
import com.cloud.rapid.project.mapper.RpProjectMapper;
import com.cloud.rapid.project.service.RpProjectService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 项目管理
 */
@Slf4j
@Service
public class RpProjectServiceImpl extends ServiceImpl<RpProjectMapper, RpProject> implements RpProjectService {

    /**
     * 项目列表
     *
     * @return
     */
    @Override
    public List<RpProject> listProject() {
        List<RpProject> data = this.list();
        return data;
    }

    /**
     * 修改项目
     *
     * @param id
     * @param name
     */
    @Override
    public void updateProjectById(String id, String name) {
        RpProject data = this.getById(id);
        data.setName(name);
        this.updateById(data);
    }
}
